package com.skt.domain.DTO.request;


import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * 用户主动修改密码的请求体
 * 
 * ⚠️ 仅用于已认证用户修改自身密码
 * ⚠️ 不包含用户ID（身份由安全上下文自动绑定）
 * ⚠️ 不负责业务校验（如密码一致性、旧密码正确性），仅做基础格式约束
 */
public class ChangePasswordRequest {

    @NotBlank(message = "旧密码不能为空")
    private String oldPassword;

    @NotBlank(message = "新密码不能为空")
    @Pattern(
        regexp = "^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).{8,32}$",
        message = "新密码必须为8-32位，且同时包含小写字母、大写字母和数字"
    )
    private String newPassword;

    @NotBlank(message = "确认密码不能为空")
    private String confirmPassword;

    // ========== Getters & Setters ==========
    
    public String getOldPassword() {
        return oldPassword;
    }

    public void setOldPassword(String oldPassword) {
        this.oldPassword = oldPassword;
    }

    public String getNewPassword() {
        return newPassword;
    }

    public void setNewPassword(String newPassword) {
        this.newPassword = newPassword;
    }

    public String getConfirmPassword() {
        return confirmPassword;
    }

    public void setConfirmPassword(String confirmPassword) {
        this.confirmPassword = confirmPassword;
    }
}